package com.minyifang.wcspf.work.ui.user.model;

import java.util.ArrayList;
import java.util.List;

public class CommentGoodsModel {


    private String ID;
    private String name;
    private String addTime;
    private String deputyPic;

    private String serviceComment = "";
    private String goodsComment = "";
    private float goodScore = 5f;
    private float serviceScore = 5f;

    private List<String> pics = new ArrayList<>();
    private List<String> savePics = new ArrayList<>();

    public CommentGoodsModel() {
        name = String.valueOf((char) (65 + Math.random() * 40));
    }

    public void addPic(String pic) {
        pics.add(pic);
    }

    public void addSavePic(String pic) {
        savePics.add(pic);
    }

    public List<String> getPics() {
        return pics;
    }

    public float getGoodScore() {
        return goodScore;
    }

    public void setGoodScore(float goodScore) {
        this.goodScore = goodScore;
    }

    public float getServiceScore() {
        return serviceScore;
    }

    public void setServiceScore(float serviceScore) {
        this.serviceScore = serviceScore;
    }

    public String getServiceComment() {
        return serviceComment;
    }

    public void setServiceComment(String serviceComment) {
        this.serviceComment = serviceComment;
    }

    public String getGoodsComment() {
        return goodsComment;
    }

    public String getID() {
        return ID;
    }

    public void setID(String ID) {
        this.ID = ID;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getAddTime() {
        return addTime;
    }

    public void setAddTime(String addTime) {
        this.addTime = addTime;
    }

    public String getDeputyPic() {
        return deputyPic;
    }

    public void setDeputyPic(String deputyPic) {
        this.deputyPic = deputyPic;
    }

    public void setGoodsComment(String goodsComment) {
        this.goodsComment = goodsComment;
    }

    public String getPicListStr() {
        if (savePics.size() == 0) return "";
        if (savePics.size() == 1) return savePics.get(0);
        StringBuilder str = new StringBuilder();
        for (int i = 0; i < savePics.size(); i++) {
            if (i != 0)
                str.append(",");
            str.append(savePics.get(i));
        }
        return str.toString();
    }
}
